<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>增加批发价格单</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../../css/index.css">
</head>

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">增加批发价格单</div>
      </div>
      <el-descriptions :column="4" border size="small">
        <el-descriptions-item label="开始时间">
          <el-form-item prop="Start_Date">
            <el-date-picker v-model.trim="form.Start_Date" type="datetime" placeholder="请选择开始时间"
              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="结算时间">
          <el-form-item prop="End_Date">
            <el-date-picker v-model.trim="form.End_Date" type="datetime" placeholder="请选择结算时间"
              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="商品流水号">
          <el-form-item prop="Article_SerialNumber">
            <el-select v-model.trim="form.Article_SerialNumber" placeholder="请选择商品" filterable
              @change="Change_Unit_Price" style="width: 100%">
              <el-option v-for="(item,index) in article_info" :key="index" :label="item.Article_Name"
                :value="item.Article_SerialNumber"></el-option>
            </el-select>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <div style="margin-bottom: 100px;">
        <div class="table_titel">
          <div class="titel">批发价格单明细</div>
          <div class="operation">
            <el-button type="primary" size="small" @click="add_wholesale_unitprice_detail">新增</el-button>
            <el-button type="danger" size="small" @click="remove_wholesale_unitprice_detail">删除</el-button>
          </div>
        </div>
        <el-descriptions :column="3" border size="small"
          v-for="(item,index) in form.Children.wholesale_unitprice_detail" :key="index">
          <el-descriptions-item label="优惠价格">
            <el-form-item prop="Unit_Price">
              <el-input v-model.trim="item.Unit_Price" type="NumBer" :disabled="isDisabled"
                placeholder="请输入优惠价格"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="开始数量">
            <el-form-item prop="Purchase_Unit_Price">
              <el-input v-model.trim="item.StartNum" type="NumBer" placeholder="请输入起止数量"></el-input>
            </el-form-item>
          </el-descriptions-item>
          <el-descriptions-item label="结束数量">
            <el-form-item prop="Purchase_Unit_Price">
              <el-input v-model.trim="item.EndNum" type="NumBer" placeholder="请输入截至数量"></el-input>
            </el-form-item>
          </el-descriptions-item>
        </el-descriptions>
      </div>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="./js/Add.js"></script>
</body>

</html>